import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
const modules = import.meta.glob('../views/*/*.vue');

import Layout from "../components/Layout/Index.vue"
import Home from "../views/Home/Index.vue"
import TemplateCode from "../views/TemplateCode/Index.vue"
const baseRouters: RouteRecordRaw[] = [
  {
    path: "/",
    name: "Home",
    component: Layout,
    redirect: "/dashboard",
    children: [
      {
        path: "dashboard",
        name: "dashboard",
        component: Home
      },
      {
        path: "templateCode",
        name: "template",
        component: TemplateCode
      }
    ]
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes: baseRouters
})


export default router;

